<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "order_logs".
 *
 * @property int $id ID
 * @property int $to_user_id
 * @property int $from_user_id
 * @property string|null $ctime
 * @property int $order_id
 * @property int $user_product_id
 * @property int $status
 * @property int $price
 */
class OrderLogs extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'order_logs';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['to_user_id', 'from_user_id', 'order_id', 'user_product_id', 'status'], 'integer'],
            [['ctime'], 'safe'],
            [['user_product_id'], 'required'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'to_user_id' => 'To User ID',
            'from_user_id' => 'From User ID',
            'ctime' => 'Ctime',
            'order_id' => 'Order ID',
            'user_product_id' => 'User Product ID',
            'status' => 'Status',
            'price' => 'Price',
        ];
    }
}
